3.493 \(\int (b \sec (e+f x))^n \sin ^3(e+f x) \, dx\)

Optimal. Leaf size=52 \[ \frac {b^3 (b \sec (e+f x))^{n-3}}{f (3-n)}-\frac {b (b \sec (e+f x))^{n-1}}{f (1-n)} \]

[Out]

b^3*(b*sec(f*x+e))^(-3+n)/f/(3-n)-b*(b*sec(f*x+e))^(-1+n)/f/(1-n)

________________________________________________________________________________________

Rubi [A]  time = 0.05, antiderivative size = 52, normalized size of antiderivative = 1.00, number of steps used = 3, number of rules used = 2, integrand size = 19, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.105, Rules used = {2622, 14} \[ \frac {b^3 (b \sec (e+f x))^{n-3}}{f (3-n)}-\frac {b (b \sec (e+f x))^{n-1}}{f (1-n)} \]

Antiderivative was successfully verified.

[In]

Int[(b*Sec[e + f*x])^n*Sin[e + f*x]^3,x]

[Out]

(b^3*(b*Sec[e + f*x])^(-3 + n))/(f*(3 - n)) - (b*(b*Sec[e + f*x])^(-1 + n))/(f*(1 - n))

Rule 14

Int[(u_)*((c_.)*(x_))^(m_.), x_Symbol] :> Int[ExpandIntegrand[(c*x)^m*u, x], x] /; FreeQ[{c, m}, x] && SumQ[u]
 &&  !LinearQ[u, x] &&  !MatchQ[u, (a_) + (b_.)*(v_) /; FreeQ[{a, b}, x] && InverseFunctionQ[v]]

Rule 2622

Int[csc[(e_.) + (f_.)*(x_)]^(n_.)*((a_.)*sec[(e_.) + (f_.)*(x_)])^(m_), x_Symbol] :> Dist[1/(f*a^n), Subst[Int
[x^(m + n - 1)/(-1 + x^2/a^2)^((n + 1)/2), x], x, a*Sec[e + f*x]], x] /; FreeQ[{a, e, f, m}, x] && IntegerQ[(n
 + 1)/2] &&  !(IntegerQ[(m + 1)/2] && LtQ[0, m, n])

Rubi steps

\begin {align*} \int (b \sec (e+f x))^n \sin ^3(e+f x) \, dx &=\frac {b^3 \operatorname {Subst}\left (\int x^{-4+n} \left (-1+\frac {x^2}{b^2}\right ) \, dx,x,b \sec (e+f x)\right )}{f}\\ &=\frac {b^3 \operatorname {Subst}\left (\int \left (-x^{-4+n}+\frac {x^{-2+n}}{b^2}\right ) \, dx,x,b \sec (e+f x)\right )}{f}\\ &=\frac {b^3 (b \sec (e+f x))^{-3+n}}{f (3-n)}-\frac {b (b \sec (e+f x))^{-1+n}}{f (1-n)}\\ \end {align*}

________________________________________________________________________________________

Mathematica [A]  time = 0.15, size = 47, normalized size = 0.90 \[ -\frac {b ((n-1) \cos (2 (e+f x))-n+5) (b \sec (e+f x))^{n-1}}{2 f (n-3) (n-1)} \]

Antiderivative was successfully verified.

[In]

Integrate[(b*Sec[e + f*x])^n*Sin[e + f*x]^3,x]

[Out]

-1/2*(b*(5 - n + (-1 + n)*Cos[2*(e + f*x)])*(b*Sec[e + f*x])^(-1 + n))/(f*(-3 + n)*(-1 + n))

________________________________________________________________________________________

fricas [A]  time = 0.68, size = 53, normalized size = 1.02 \[ -\frac {{\left ({\left (n - 1\right )} \cos \left (f x + e\right )^{3} - {\left (n - 3\right )} \cos \left (f x + e\right )\right )} \left (\frac {b}{\cos \left (f x + e\right )}\right )^{n}}{f n^{2} - 4 \, f n + 3 \, f} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((b*sec(f*x+e))^n*sin(f*x+e)^3,x, algorithm="fricas")

[Out]

-((n - 1)*cos(f*x + e)^3 - (n - 3)*cos(f*x + e))*(b/cos(f*x + e))^n/(f*n^2 - 4*f*n + 3*f)

________________________________________________________________________________________

giac [F]  time = 0.00, size = 0, normalized size = 0.00 \[ \int \left (b \sec \left (f x + e\right )\right )^{n} \sin \left (f x + e\right )^{3}\,{d x} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((b*sec(f*x+e))^n*sin(f*x+e)^3,x, algorithm="giac")

[Out]

integrate((b*sec(f*x + e))^n*sin(f*x + e)^3, x)

________________________________________________________________________________________

maple [C]  time = 1.86, size = 1732, normalized size = 33.31 \[ \text {result too large to display} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

int((b*sec(f*x+e))^n*sin(f*x+e)^3,x)

[Out]

-1/8/(f*n-3*f)*b^n*2^n*(exp(2*I*(f*x+e))+1)^(-n)*exp(I*(f*x+e))^n*exp(-1/2*I*(Pi*n*csgn(I/(exp(2*I*(f*x+e))+1)
)*csgn(I*exp(I*(f*x+e)))*csgn(I*exp(I*(f*x+e))/(exp(2*I*(f*x+e))+1))-Pi*n*csgn(I/(exp(2*I*(f*x+e))+1))*csgn(I*
exp(I*(f*x+e))/(exp(2*I*(f*x+e))+1))^2-Pi*n*csgn(I*exp(I*(f*x+e)))*csgn(I*exp(I*(f*x+e))/(exp(2*I*(f*x+e))+1))
^2+Pi*n*csgn(I*exp(I*(f*x+e))/(exp(2*I*(f*x+e))+1))^3-Pi*n*csgn(I*exp(I*(f*x+e))/(exp(2*I*(f*x+e))+1))*csgn(I*
b*exp(I*(f*x+e))/(exp(2*I*(f*x+e))+1))^2+Pi*n*csgn(I*exp(I*(f*x+e))/(exp(2*I*(f*x+e))+1))*csgn(I*b*exp(I*(f*x+
e))/(exp(2*I*(f*x+e))+1))*csgn(I*b)+Pi*n*csgn(I*b*exp(I*(f*x+e))/(exp(2*I*(f*x+e))+1))^3-Pi*n*csgn(I*b*exp(I*(
f*x+e))/(exp(2*I*(f*x+e))+1))^2*csgn(I*b)+6*f*x+6*e))-1/8*exp(I*(f*x+e))^n*(exp(2*I*(f*x+e))+1)^(-n)*2^n*b^n/(
f*n-3*f)*exp(1/2*I*(-Pi*n*csgn(I/(exp(2*I*(f*x+e))+1))*csgn(I*exp(I*(f*x+e)))*csgn(I*exp(I*(f*x+e))/(exp(2*I*(
f*x+e))+1))+Pi*n*csgn(I/(exp(2*I*(f*x+e))+1))*csgn(I*exp(I*(f*x+e))/(exp(2*I*(f*x+e))+1))^2+Pi*n*csgn(I*exp(I*
(f*x+e)))*csgn(I*exp(I*(f*x+e))/(exp(2*I*(f*x+e))+1))^2-Pi*n*csgn(I*exp(I*(f*x+e))/(exp(2*I*(f*x+e))+1))^3+Pi*
n*csgn(I*exp(I*(f*x+e))/(exp(2*I*(f*x+e))+1))*csgn(I*b*exp(I*(f*x+e))/(exp(2*I*(f*x+e))+1))^2-Pi*n*csgn(I*exp(
I*(f*x+e))/(exp(2*I*(f*x+e))+1))*csgn(I*b*exp(I*(f*x+e))/(exp(2*I*(f*x+e))+1))*csgn(I*b)-Pi*n*csgn(I*b*exp(I*(
f*x+e))/(exp(2*I*(f*x+e))+1))^3+Pi*n*csgn(I*b*exp(I*(f*x+e))/(exp(2*I*(f*x+e))+1))^2*csgn(I*b)+6*f*x+6*e))+1/8
*exp(I*(f*x+e))^n*(exp(2*I*(f*x+e))+1)^(-n)*2^n*b^n/(-3+n)/(-1+n)/f*(n-9)*exp(-1/2*I*(Pi*n*csgn(I/(exp(2*I*(f*
x+e))+1))*csgn(I*exp(I*(f*x+e)))*csgn(I*exp(I*(f*x+e))/(exp(2*I*(f*x+e))+1))-Pi*n*csgn(I/(exp(2*I*(f*x+e))+1))
*csgn(I*exp(I*(f*x+e))/(exp(2*I*(f*x+e))+1))^2-Pi*n*csgn(I*exp(I*(f*x+e)))*csgn(I*exp(I*(f*x+e))/(exp(2*I*(f*x
+e))+1))^2+Pi*n*csgn(I*exp(I*(f*x+e))/(exp(2*I*(f*x+e))+1))^3-Pi*n*csgn(I*exp(I*(f*x+e))/(exp(2*I*(f*x+e))+1))
*csgn(I*b*exp(I*(f*x+e))/(exp(2*I*(f*x+e))+1))^2+Pi*n*csgn(I*exp(I*(f*x+e))/(exp(2*I*(f*x+e))+1))*csgn(I*b*exp
(I*(f*x+e))/(exp(2*I*(f*x+e))+1))*csgn(I*b)+Pi*n*csgn(I*b*exp(I*(f*x+e))/(exp(2*I*(f*x+e))+1))^3-Pi*n*csgn(I*b
*exp(I*(f*x+e))/(exp(2*I*(f*x+e))+1))^2*csgn(I*b)+2*f*x+2*e))+1/8*exp(I*(f*x+e))^n*(exp(2*I*(f*x+e))+1)^(-n)*2
^n*b^n/(-3+n)/(-1+n)/f*(n-9)*exp(1/2*I*(-Pi*n*csgn(I/(exp(2*I*(f*x+e))+1))*csgn(I*exp(I*(f*x+e)))*csgn(I*exp(I
*(f*x+e))/(exp(2*I*(f*x+e))+1))+Pi*n*csgn(I/(exp(2*I*(f*x+e))+1))*csgn(I*exp(I*(f*x+e))/(exp(2*I*(f*x+e))+1))^
2+Pi*n*csgn(I*exp(I*(f*x+e)))*csgn(I*exp(I*(f*x+e))/(exp(2*I*(f*x+e))+1))^2-Pi*n*csgn(I*exp(I*(f*x+e))/(exp(2*
I*(f*x+e))+1))^3+Pi*n*csgn(I*exp(I*(f*x+e))/(exp(2*I*(f*x+e))+1))*csgn(I*b*exp(I*(f*x+e))/(exp(2*I*(f*x+e))+1)
)^2-Pi*n*csgn(I*exp(I*(f*x+e))/(exp(2*I*(f*x+e))+1))*csgn(I*b*exp(I*(f*x+e))/(exp(2*I*(f*x+e))+1))*csgn(I*b)-P
i*n*csgn(I*b*exp(I*(f*x+e))/(exp(2*I*(f*x+e))+1))^3+Pi*n*csgn(I*b*exp(I*(f*x+e))/(exp(2*I*(f*x+e))+1))^2*csgn(
I*b)+2*f*x+2*e))

________________________________________________________________________________________

maxima [A]  time = 1.33, size = 59, normalized size = 1.13 \[ -\frac {\frac {b^{n} \cos \left (f x + e\right )^{-n} \cos \left (f x + e\right )^{3}}{n - 3} - \frac {b^{n} \cos \left (f x + e\right )^{-n} \cos \left (f x + e\right )}{n - 1}}{f} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((b*sec(f*x+e))^n*sin(f*x+e)^3,x, algorithm="maxima")

[Out]

-(b^n*cos(f*x + e)^(-n)*cos(f*x + e)^3/(n - 3) - b^n*cos(f*x + e)^(-n)*cos(f*x + e)/(n - 1))/f

________________________________________________________________________________________

mupad [B]  time = 0.94, size = 67, normalized size = 1.29 \[ -\frac {{\left (\frac {b}{\cos \left (e+f\,x\right )}\right )}^n\,\left (9\,\cos \left (e+f\,x\right )-\cos \left (3\,e+3\,f\,x\right )-n\,\cos \left (e+f\,x\right )+n\,\cos \left (3\,e+3\,f\,x\right )\right )}{4\,f\,\left (n^2-4\,n+3\right )} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

int(sin(e + f*x)^3*(b/cos(e + f*x))^n,x)

[Out]

-((b/cos(e + f*x))^n*(9*cos(e + f*x) - cos(3*e + 3*f*x) - n*cos(e + f*x) + n*cos(3*e + 3*f*x)))/(4*f*(n^2 - 4*
n + 3))

________________________________________________________________________________________

sympy [F(-1)]  time = 0.00, size = 0, normalized size = 0.00 \[ \text {Timed out} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((b*sec(f*x+e))**n*sin(f*x+e)**3,x)

[Out]

Timed out

________________________________________________________________________________________